1. Field of the Invention
Aspects of the present invention relate to an image forming apparatus and method, and more particularly, to an image forming apparatus that selects and prints paper suitable for a user's demand based on information regarding the width and height of a FixedPage when an XML paper specification (XPS) file does not include information regarding printing paper, and an image forming method thereof.
2. Description of the Related Art
Image forming apparatuses are devices that print printing data generated by a terminal device, such as a desktop computer, a laptop computer, a personal digital assistant (PDA), and a digital camera, on a recording medium. Examples of image forming apparatuses include copiers, printers, facsimile machines, and multifunction peripherals (MFP) implementing the functions of the aforementioned machines using a single device.
Recent image forming apparatuses support a direct printing function for files in Portable Document Format (PDF), Tagged Image File Format (TIFF), or Joint Photographic Experts Group (JPG). The direct printing function indicates directly performing printing simply by transmitting a file to an image forming apparatus without executing a separate application program in the terminal device.
As data to support the direct printing, an XML paper specification (XPS) file is used. An XPS file is a fixed-layout electronic file designed to preserve document fidelity and be capable of sharing the file, which is a zip archive in which all the resources needed for a corresponding document or job are systemized in a directory structure and the relationship between the directories is made up using an Extensible Markup Language (XML). Such an XPS file has a logical structure of a tree type having a plurality of layers as illustrated in FIG. 1.
FIG. 1 is a conceptual diagram illustrating a logical structure of an XPS file. As illustrated in FIG. 1, the XPS file includes several levels, such as a job level 10, a document level 20, and a page level 30. Each document level and each page level may include a plurality of documents and a plurality of pages, respectively. Different printing options can be set for each document and each page. A printing option set for a job level is applied to all areas under a corresponding job, a printing option set for a document level is applied to all areas under a corresponding document, and a printing option set for a page level is applied only to a corresponding page.
Information regarding printing paper onto which a page is printed is written in a PrintTicket corresponding to each level. The tag “PageMediaSize” in a PrintTicket includes information regarding printing paper.
However, as illustrated in FIG. 1, the “PageMediaSize” tag is an optional part in an XPS file. Accordingly, an XPS file may not include information regarding printing paper. However, the current specification of XPS does not define a method for processing such a case. Therefore, if a user prints an XPS file in which the printing paper option is not set, printing may not be performed. Even if printing is performed, the printed output may not have a format desired by the user. Therefore, there is a need for methods for selecting and printing paper suitable for a user's demand even when an XPS file does not include information regarding printing paper.